﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PMS.BLL
{
    public class Unit
    {
        private readonly PMS.DAL.UnitDAL unitdal = new PMS.DAL.UnitDAL();
        public bool Insert(PMS.Model.Unit unit)
        {
            if (unitdal.IsExist(unit.UnitName))
            {
                return false;
            }
            else
            {
                return unitdal.Insert(unit);
            }            
        }
        public IList<PMS.Model.Unit> GetAllList()
        {
            return unitdal.GetList("");
        }
    }
}
